<%= render partial: 'head',layout: false %>
<div class="row">

  <div class="col-sm-8 blog-main">
    <% @articles.each do |article| %>
    <div class="blog-post">
      <h2 class="blog-post-title"><a style="color:#333 " href="<%= blog_path(article) %>"><%= article.title %></a></h2>
      <p class="blog-post-meta">
        <%= article.created_at.to_time.strftime( '%Y年%m月%d日 %H时%M分') %> by 张恒强
        <span class="pull-right">浏览次数:<%= article.browser_number %></span>
      </p>
      <p class="blog-post-meta">
        <% article.tags.each do |tag| %>
        <span style="display: inline-block;" class="label label-default"><%= tag.name %></span>
            <% end %>
      </p>
      <div style="border-bottom: 1px dashed #D1D1D1;">

        <%== article.content %>
      </div>
    </div>
<% end %>

  </div>

  <div class="col-sm-3 col-sm-offset-1 blog-sidebar">
    <%= render partial: 'tags',locals:{tags:@tags },layout:false %>
    <%= render partial: 'category',locals:{categories:@categories},layout:false %>
    <%= render partial: 'archives',layout:false %>
  </div>
    </div>